package com.mysoft.gfyx.common.util;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Component;

import java.util.Objects;

@Component
public class PageUtil {

    @Autowired
    private Environment environment;

    public String getPageUrlBusinessType(String type) {
        String pageUrl = "";

        switch (type) {
            case "客户分配":
                pageUrl = environment.getProperty("site-page.customer-manager");
                break;
            case "商机订阅":
                pageUrl = environment.getProperty("site-page.opportunity-subscription");
                break;
            case "项目订阅":
                pageUrl = environment.getProperty("site-page.project-subscription");
                break;
            case "线索订阅":
                pageUrl = environment.getProperty("site-page.radar-subscription");
                break;
            default:
                break;
        }

        return pageUrl;
    }
}
